﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="viewempprofile.aspx.cs" Inherits="Hired.viewempprofile"
    MasterPageFile="Hired2Div.master" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="ContentHead" runat="server" ContentPlaceHolderID="HeadPlaceHolder">
    <style type="text/css">
        .profile_left
        {
            float: left;
            width: 200px;
        }
        .profile_right
        {
            float: left;
            width: 540px;
        }
        .profile_listedjobs
        {
            float: left;
            width: 270px;
            height: 575px;
            background: url(images/listedjobs.png);
        }
        
        .profile_viewlistedjobs
        {
            
            float:right;
            margin-right:3px;
            margin-top:140px;
        }
        p.profile
        {
            margin-top: 10px;
            padding-right: 0px;
            padding-left: 0px;
        }
        p.listedjobs
        {
            margin-top: 48px;
        }
        .profile_addjob
        {
            float: right;
            overflow: hidden;
            width: 97px;
            height: 26px;
            margin-right: 3px;
            margin-top: 7px;
            background: url(images/addJob.png);
        }
        
        .heading
        {
            position: relative;
            padding-left: 5px;
            font-family: Impact;
            font-size:120%;
            color:Silver;
        }
        
        .headingline
        {
            width: 335px;
        }
        
        .txtComment
        {
            overflow: hidden;
        }
               
        .style2
        {
            color: #C0C0C0;
            font-size: small;
            font-weight: 700;
        }
        .style3
        {
            color: #C0C0C0;
            font-size: medium;
        }
               
        .style4
        {
            color: #C0C0C0;
            font-size: medium;
        }
        
         .updateinfo
        {
            float: right;
            position: absolute;
            right: -280px;
            top: 5px;
        }
        
        .style1
        {
            margin: 0 auto;
            width: 50%;
        }
               
    </style>
</asp:Content>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="LeftPlaceHolder">
    <asp:UpdatePanel ID="upPanel" runat="server">
    <ContentTemplate>
    <div class="profile_left">
        <br />
        <img alt="" src="images/ProfilePic.png" /><br />
        <br />
        <p class="profile">
            <asp:ImageButton ID ="btnWall" runat="server" ImageUrl="images/Wall.png" 
                onclick="btnWall_Click"/></p>
        <p class="profile">
            <asp:ImageButton ID="btnInformation" runat="server" 
                ImageUrl="images/empinfo.png" onclick="btnInformation_Click" /></p>
          <p class="profile">
            <asp:ImageButton ID="btnBuddyList" runat="server" 
                ImageUrl="images/buddyList.png" onclick="btnBuddyList_Click" /></p>
        <p class="profile">
            <asp:ImageButton ID="btnAddBuddy" runat="server" 
                ImageUrl="images/addbuddy.png" onclick="btnAddBuddy_Click" />
            <asp:ConfirmButtonExtender ID="AddBuddyConfirmButtonExtender" 
                runat="server" ConfirmText="" Enabled="True" TargetControlID="btnAddBuddy" DisplayModalPopupID="btnAddBuddy_ModalPopupExtender">
            </asp:ConfirmButtonExtender>

            <asp:ModalPopupExtender ID="btnAddBuddy_ModalPopupExtender" runat="server" 
                BackgroundCssClass="modalBackground" BehaviorID="BuddyModalPopupExtender" 
                CancelControlID="btnAddBuddyCancel" DropShadow="True" DynamicServicePath="" 
                Enabled="True" OkControlID="btnAddBuddyConfirm" PopupControlID="pnlModalPopUp" 
                TargetControlID="btnAddBuddy">
            </asp:ModalPopupExtender>
        </p>
           
       
         <p class="profile">
            <asp:ImageButton ID="btnImages" runat="server" ImageUrl="images/images.png" 
                 onclick="btnImages_Click" />
            </p>
       <p class="profile">
            <asp:ImageButton ID="btnMessage" runat="server" ImageUrl="images/message.png" 
                onclick="btnMessage_Click" />
            <asp:ModalPopupExtender ID="btnMessage_ModalPopupExtender" runat="server" 
                BackgroundCssClass="modalBackground" BehaviorID="MessageModalPopupExtender" 
                CancelControlID="btnAddMessageCancel" DropShadow="True" DynamicServicePath="" 
                Enabled="True"
                PopupControlID="pnlMessageModalPopUp" TargetControlID="btnMessage">
            </asp:ModalPopupExtender>
            </p>
    </div>
   
            <div class="profile_right">
        <asp:Panel ID="pnlWall" runat="server" Width="544px" EnableViewState="False">
        <asp:Label ID ="lblUsername" runat="server" Font-Bold="True" Font-Size="Large"></asp:Label>
        <br />
        <asp:TextBox ID="txtComment" runat="server" Height="40px" TextMode="MultiLine" Width="450px" CssClass="txtComment"></asp:TextBox>
            <asp:Button ID="btnComment" runat="server" 
                Text="Comment" Width="79px" onclick="btnComment_Click" />
         <%--  <asp:TextBoxWatermarkExtender ID="txtComment_TextBoxWatermarkExtender" 
                runat="server" Enabled="True" TargetControlID="txtComment" 
                WatermarkCssClass="watermark" WatermarkText="Click here to write a comment...">
            </asp:TextBoxWatermarkExtender>--%>

        </asp:Panel>
        <asp:Panel ID="pnlContainer" runat="server"></asp:Panel>
        <asp:Panel ID="pnlPersonalInformation" runat="server" Visible="false">
       <div class="heading">
                <span class="style4">Company</span> <span class="style4">information</span><div class="headingline">
                </div>
            </div>
            <br />
            <p>
            <asp:Label ID="lblCompanyName" runat="server">Company Name:</asp:Label>
            &nbsp;<asp:Label ID="lblCompanyNameValue" runat="server"></asp:Label>
            </p>
            <p>
                <asp:Label ID="lblDateFounded" runat="server">Date Founded:</asp:Label>
                &nbsp;<asp:Label ID="lblDateFoundedValue" runat="server"></asp:Label>
            </p>
            <p>
                <asp:Label ID="lblContactNumber" runat="server">Contact Number:</asp:Label>
                &nbsp;<asp:Label ID="lblContactNumberValue" runat="server"></asp:Label>
            </p>
            <p>
                <asp:Label ID="lblWebsite" runat="server">Website:</asp:Label>
                &nbsp;<asp:Label ID="lblWebsiteValue" runat="server"></asp:Label>
            </p>
            <p>
                <asp:Label ID="lblEmailAddress" runat="server">E-mail address:</asp:Label>
                &nbsp;<asp:Label ID="lblEmailAddressValue" runat="server"></asp:Label>
            </p>
            <p>
                <asp:Label ID="lblAddress" runat="server">Address:</asp:Label>
                &nbsp;<asp:Label ID="lblAddressValue" runat="server"></asp:Label>
            </p>
            <p>
                <asp:Label ID="lblPostalCode" runat="server">ZIP/Postal Code:</asp:Label>
                &nbsp;<asp:Label ID="lblPostalCodeValue" runat="server"></asp:Label>
            </p>
                </asp:Panel>

       <asp:Panel ID="pnlBuddyList" runat="server" Visible="false">
<asp:ListView ID="lvBuddyList" runat="server" DataKeyNames="Username">
                            <EmptyDataTemplate>
                                <span>No data was returned.</span>
                            </EmptyDataTemplate>
                            <ItemTemplate>
                                <table width="560px">
                                    <tr>
                                        <td width="100px">
                                            <asp:Image ID="imgBuddyProfile" runat="server" ImageUrl='<%# Eval("ImageAddress") %>' />
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="lblBuddyName" runat="server" Text='<%# Eval("Name") %>' PostBackUrl='<%# "viewprofile.aspx?username=" + Eval("Username") %>' />
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                            <LayoutTemplate>
                                <div id="itemPlaceholderContainer" runat="server" style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                                    <span runat="server" id="itemPlaceholder" />
                                </div>
                                <div style="text-align: center; background-color: #FFCC66; font-family: Verdana, Arial, Helvetica, sans-serif;
                                    color: #333333;">
                                    <asp:DataPager ID="DataPager1" runat="server">
                                        <Fields>
                                            <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" />
                                        </Fields>
                                    </asp:DataPager>
                                </div>
                            </LayoutTemplate>
                        </asp:ListView>
        </asp:Panel>
      <asp:Panel ID="pnlImages" runat="server" Visible="False" style="width: 560px;">
        <div class="heading">Your images<div class="headingline"></div></div>
                    <div class="lvImages">
         <asp:ListView ID="lvImage" runat="server" DataKeyNames="ImageAddress" DataSourceID="edsEmp">
                
                <ItemTemplate>
                                <asp:Image ID="imgThumbnail" runat="server" Width="120px" Height="120px" ImageUrl='<%# Eval("ImageAddress") %>'
                                    CssClass="imgThumbnail" />
                                    <asp:ModalPopupExtender ID="lvImageModalPopupExtender" runat="server" 
                                    TargetControlID="imgThumbnail" DropShadow="False" CancelControlID="btnExit" PopupControlID="pnlImgPopup" 
                                    BackgroundCssClass="modalBackground" />
                                    <asp:Panel ID="pnlImgPopup" runat="server" Cssclass="modalPopup">
                                     <asp:Image ID="imgPopup" runat="server" ImageUrl='<%# Eval("ImageAddress") %>' />
                                    <br />
                                    <br />
                                    <asp:ImageButton ID="btnExit" runat="server" Text="Exit" ImageUrl="images/closelabel.gif"
                                        Style="float: right;" />
                                    <br />
                                    </asp:Panel>
                </ItemTemplate>
                                   <LayoutTemplate>
                                    <table>
                                    <tr>
                                        <td runat="server" id="itemPlaceHolder">
                                        </td>
                                    </tr>
                                </table>
                                <asp:DataPager ID="DataPagerImages" runat="server" PagedControlID="lvImages" PageSize="1"
                                    style="float: right; margin: 15px 5px 5px auto;">
                                    <Fields>
                                        <asp:NextPreviousPagerField NextPageText="" />
                                        <asp:NumericPagerField NextPageText="" PreviousPageText="" />
                                        <asp:NextPreviousPagerField NextPageText="Next..." PreviousPageText="" />
                                    </Fields>
                                </asp:DataPager>
                                   </LayoutTemplate>
                  </asp:ListView>
                        
                   </div>
                <asp:EntityDataSource ID="edsEmp" runat="server" 
                            ConnectionString="name=hireddbEntities" DefaultContainerName="hireddbEntities" 
                            EnableFlattening="False" EntitySetName="ImageRosters" Where="it.UserID == @ID">
                            <WhereParameters>
                            <asp:ControlParameter ControlID="lvImage" DbType="String" DefaultValue="" Name="id" PropertyName="SelectedValue" />
                            </WhereParameters>
                        </asp:EntityDataSource>
                        </asp:Panel>

     <%--   //Add as buddy--%>
     <asp:Panel ID="pnlModalPopUp" runat="server" CssClass="modalPopup">
     <strong>Add as Buddy</strong><br />Do you wish to add
     <asp:Label ID="lblBuddyUsername" runat="server"></asp:Label>
     &nbsp;as a buddy?
     <br />
     <br />
     <asp:Button ID ="btnAddBuddyCancel" style="float:right" runat="server" Text="Cancel" />
      <asp:Button ID="btnAddBuddyConfirm" style="float:right;margin-right:25px;" 
             runat="server" Text="OK" />
             <asp:Button ID="btnPopup" runat ="server" Style="display:none;" />
             <br />
     </asp:Panel>
     <asp:Panel ID="pnlConfirmBuddyPopup" runat="server" CssClass="modalPopup">
     <asp:Label ID="lblConfirmBuddyUsername" runat="server" />
        <br />
        <br />
        <div style="width:100%; text-align:center;">
        <asp:Button ID="btnConfirmExit" style="margin:0 auto;" runat="server" Text="OK" />
        </div>
        <br />
     </asp:Panel>
     <asp:ModalPopupExtender ID="ModalPopupBuddyConfirm" runat="server" TargetControlID="btnPopup"
                    DropShadow="True" PopupControlID="pnlConfirmBuddyPopUp" CancelControlID="btnConfirmExit"
                    BackgroundCssClass="modalBackground" />

    <%-- //MessageBox--%>
    <asp:Panel ID="pnlMessageModalPopUp" runat="server" CssClass="modalPopup">
     <table class="style1">
            <tr>
                <td style="text-align: right">
                    To:</td>
                <td>
                    <asp:Label ID="lblRecipient" runat="server" /></td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Subject:</td>
                <td>
                    <asp:TextBox ID="txtSubject" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="text-align: right">
                    Content:</td>
                <td>
                    <asp:TextBox ID="txtContent" runat="server" Height="197px" TextMode="MultiLine" 
                        Width="315px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center;">
                <asp:Button ID="btnAddMessageConfirm" runat="server" Text="Send" onclick="btnSend_Click" style="margin-right: 10px;"/>
                <asp:Button ID="btnAddMessageCancel" runat="server" Text="Cancel" style="margin-left: 10px;" />
                </td>
                </tr>
            </table>
    </asp:Panel>

    </div>
             </ContentTemplate>
             </asp:UpdatePanel>  
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="RightPlaceHolder">
    <div class="profile_listedjobs">
        <p class="listedjobs">
            &nbsp;</p>
        <p class="listedjobs">
            <a href="viewjob.aspx">
                <img alt="" class="style2" src="images/lj_driver.png" /></a></p>
        <p class="listedjobs">
            <img alt="" class="style3" src="images/lj_programmer.png" /></p>

            <div class="profile_viewlistedjobs">
                    <asp:LinkButton ID="linkBtnViewAll" runat="server" 
                        onclick="linkBtnViewAll_Click">View All</asp:LinkButton>
            </div>
    </div>
  
      

            
</asp:Content>
